import request from '@/config/axios'

export interface ContinueStudyRecordVO {
  id: number
  oldGrade: number
  newGrade: number
  studentId: number
  studentCode: string
  deptId: number
  remark: string
  studentName: string
  type: number
  oldState: number
  newState: number
}

// 查询升学记录分页
export const getContinueStudyRecordPage = async (data) => {
  return await request.post({ url: `/cmis/continue-study-record/page`, data })
}
// 查询升学记录列表
export const getContinueStudyRecordList = async (data) => {
  return await request.post({ url: `/cmis/continue-study-record/query`, data })
}

// 查询升学记录详情
export const getContinueStudyRecord = async (data) => {
  return await request.post({ url: `/cmis/continue-study-record/get`, data })
}

// 新增升学记录
export const createContinueStudyRecord = async (data: ContinueStudyRecordVO) => {
  return await request.post({ url: `/cmis/continue-study-record/create`, data })
}

// 修改升学记录
export const updateContinueStudyRecord = async (data: ContinueStudyRecordVO) => {
  return await request.post({ url: `/cmis/continue-study-record/update`, data })
}

// 删除升学记录
export const deleteContinueStudyRecord = async (data) => {
  return await request.delete({ url: `/cmis/continue-study-record/delete`, data })
}

// 导出升学记录 Excel
export const exportContinueStudyRecord = async (data) => {
  return await request.postDownload({ url: `/cmis/continue-study-record/export-excel`, data })
}

// 下载升学记录 Excel模版
export const importTemplate = async () => {
  return await request.download({ url: `/cmis/continue-study-record/get-import-template` })
}

// 导入升学记录 Excel
export const importContinueStudyRecord = async (data) => {
  return await request.upload({ url: `/cmis/continue-study-record/import-excel`, data })
}
